body {
    display: flex;
    flex-direction: row; /* 改为列布局以适应不同屏幕 */
    margin: 0;
    height: 100vh;
    font-family: 'Open Sans', Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}
button {
    font-family: 'Open Sans', Arial, sans-serif;
    color: #333;
}
#sidebar {
    background-color: #003366;
    color: white;
    padding-bottom:5200px;
    margin-bottom: 9999px;
    width: 200px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#sidebar img {
    max-width: 100%;
    margin-bottom: 20px;
}

#sidebar a {
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
    margin: 5px 0;
    transition: background-color 0.3s;
}

#sidebar a:hover {
    background-color: #0056b3;
}

#content {
    flex-grow: 1;
    padding: 20px;
}

#main-content {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    width: calc(100% - 220px);
}

.data-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.tabs-content > .content.active {
    -webkit-animation: fadeEffect 1s;
    animation: fadeEffect 1s;
}

/* 菜品展示区样式 */
.dish-card {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex; /* 使用flex布局 */
    flex-direction: row; /* 垂直排列 */
    min-width: 300px;
    margin-right: 15px;
}

.dish-card img {
    width: 100%;
    height: auto;
    max-width: 50%;
    object-fit: cover;
    max-height: 150px; /* 限制图片最大高度 */
}

.dish-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track-container {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.dish-details {
    padding: 10px;
    background-color: #fff;
    width: 50%;
}

.dish-name {
    font-size: 1.2em;
    color: #000;
}

.dish-price, .dish-type {
    color: #666;
}
/* 交流区样式 */
.communication-section {
    margin: 20px 0;
}

/* 评论区样式 */
.review-section {
    margin: 20px;
}

.review-item {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.review-item img {
    max-width: 100%; /* 确保图片不超过容器宽度 */
    height: auto;
    object-fit: contain;
    max-height: 200px; /* 调整图片最大高度 */
    margin-top: 10px;
}

.review-sender, .review-dish, .review-rating, .review-time, .review-details, .review-reply {
    margin-bottom: 10px;
}

.review-sender, .review-dish {
    font-weight: bold;
    color: #0056b3;
}

.review-rating {
    color: #000;
}

.review-time {
    font-style: italic;
    color: #666;
}

.review-details, .review-reply {
    color: #333;
}
.post {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.post img {
    max-width: 100%; /* 确保图片不超过容器宽度 */
    height: auto;
    object-fit: contain;
    max-height: 200px; /* 调整图片最大高度 */
    margin-top: 10px;
}

.post-author, .post-title, .post-time, .post-details {
    margin-bottom: 10px;
}

.post-author {
    font-weight: bold;
    color: #0056b3;
}

.post-title {
    font-size: 1.2em;
    color: #000;
}

.post-time {
    font-style: italic;
    color: #666;
}

.post-details {
    color: #333;
}

.post-actions a {
    color: #0056b3;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #0056b3;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.post-actions a:hover {
    background-color: #0056b3;
    color: white;
}

/* 公告区样式 */
.announcement {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}
.announcement p {
    margin-bottom: 10px;
    color: #333;
}
.announcement .announcement-title {
    font-weight: bold;
    color: #0056b3;
    font-size: 1.2em;
}
.announcement .announcement-content {
    color: #666;
    overflow-wrap: break-word; /* 确保文本在容器内换行 */
}
/* 响应式设计 */
@media (max-width: 768px) {
    .dish-card, .post, .announcement {
        margin-left: 10px;
        margin-right: 10px;
        flex-direction: column;
    }
}

@-webkit-keyframes fadeEffect {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeEffect {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/* 动画和过渡效果 */
.dish-card:hover, .post:hover, .announcement:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}
.content-row {
    display: flex;
    justify-content: space-between;
}

.communication-section {
    margin: 10px; /* 添加一些间距 */
}
.announcement-section{
    flex: 1; /* 每个部分占据等量空间 */
    margin: 20px; /* 添加一些间距 */
}
.content-column{
    display: flex;
    flex-direction: column;
    /*noinspection CssInvalidPropertyValue*/
    width: -webkit-fill-available;
    -webkit-column-width: fill-available;
}
@-webkit-region .content-column {
    -webkit-column-width: fill-available;
}
.vote-section {
    flex: 1;
    margin: 20px;
}
.vote-item {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.vote-title, .vote-question {
    display: block; /* 使标题和问题在各自的行显示 */
    margin-bottom: 10px;
}

.vote-title {
    font-weight: bold;
    color: #0056b3;
    font-size: 1.2em;
}

.vote-question {
    color: #333;
}
input[type="radio"] {
    margin-right: 5px;
}

input[type="submit"] {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #003366;
}
/* 投诉区样式 */
.complaint-section {
    margin: 20px 0;
}

.complaint-item {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.complaint-item form {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.complaint-item select,
.complaint-item input[type="text"],
.complaint-item input[type="submit"] {
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.complaint-item input[type="submit"] {
    background-color: #0056b3;
    color: white;
    cursor: pointer;
    border: none;
}

.complaint-item input[type="submit"]:hover {
    background-color: #003366;
}
.liked {
    color: red; /* 或者您喜欢的任何样式 */
}
/* 回复列表的整体样式 */
.comment-list {
    margin-top: 10px;
    padding: 5px;
    background-color: #f2f2f2; /* 背景颜色 */
    border-radius: 5px; /* 边框圆角 */
}

/* 单个回复的样式 */
.comment-item {
    padding: 10px;
    border-bottom: 1px solid #ddd; /* 分隔线 */
}
/* 回复内容的每个部分（作者、内容、时间）的样式 */
.comment-item span {
    display: block; /* 使每个span独占一行 */
    margin-bottom: 5px; /* 增加底部外边距 */
}
/* 最后一个回复项没有底部边框 */
.comment-item:last-child {
    border-bottom: none;
}

/* 回复计数的样式 */
.comment-count {
    font-weight: bold;
    color: #333;
}

/* 回复作者的样式 */
.comment-author {
    color: #007bff; /* 蓝色 */
    font-style: italic;
}

/* 回复内容的样式 */
.comment-content {
    color: #555;
    margin-top: 5px;
}

/* 回复时间的样式 */
.comment-time {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}
/* 最后一个元素不需要底部外边距 */
.comment-item span:last-child {
    margin-bottom: 0;
}
.comment-input {
    /*noinspection CssInvalidPropertyValue*/
    width: -webkit-fill-available;
    padding: 8px;
    margin-bottom: 5px;
}

.comment-submit {
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #0056b3;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.comment-submit:hover {
    background-color: #0056b3;
    color: white;
}

